@declarion/react 0.44.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{DraggableChildrenTable-G4Sw1XAD.js → DraggableChildrenTable-B6KjWkwD.js} +39 -39
- package/dist-lib/{DynamicIcon-DeRpAaXm.js → DynamicIcon-Dc2j-rg_.js} +19 -17
- package/dist-lib/{Grid-CXn-IK3H.js → Grid-OdquWJNX.js} +2 -2
- package/dist-lib/{LayoutRenderer-DX8pFS5A.js → LayoutRenderer-CzAdhjNT.js} +794 -787
- package/dist-lib/{MarkdownRenderer-CreI9x2m.js → MarkdownRenderer-C6bhrAIe.js} +10 -10
- package/dist-lib/{RefreshControl-DFh0-gCb.js → RefreshControl-F9Ib9asP.js} +179 -179
- package/dist-lib/{SmartDetailPage.impl-K6Jj1-9z.js → SmartDetailPage.impl-DdSu3kmW.js} +631 -593
- package/dist-lib/{SmartRecordListPage.impl-DQW_uVfL.js → SmartRecordListPage.impl-SkIp0_Rd.js} +220 -209
- package/dist-lib/api/agents.d.ts +39 -7
- package/dist-lib/components/agents/AgentChatPanel.d.ts +6 -1
- package/dist-lib/components/agents/transcript-runs.d.ts +29 -0
- package/dist-lib/components/file-widgets/host.d.ts +1 -0
- package/dist-lib/components/list/QuickPeek.d.ts +1 -1
- package/dist-lib/components/pages/exportRequest.d.ts +3 -3
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +4 -2
- package/dist-lib/components/pages/list/cardProjection.d.ts +2 -1
- package/dist-lib/components/pages/list/filter-meta.d.ts +22 -8
- package/dist-lib/components/shared/RowActionsKebab.d.ts +3 -2
- package/dist-lib/components/views/ViewSwitcher.d.ts +2 -1
- package/dist-lib/hooks/useAgentConversation.d.ts +7 -19
- package/dist-lib/hooks/useCursorEntityData.d.ts +3 -2
- package/dist-lib/hooks/useFilters.d.ts +1 -0
- package/dist-lib/icons.js +1 -1
- package/dist-lib/index.d.ts +8 -1
- package/dist-lib/index.js +3246 -2984
- package/dist-lib/lib/actions.d.ts +1 -1
- package/dist-lib/lib/anchor.d.ts +37 -0
- package/dist-lib/lib/filter-evaluator.d.ts +16 -0
- package/dist-lib/lib/filters.d.ts +10 -4
- package/dist-lib/lib/messages.d.ts +1 -0
- package/dist-lib/lib/variants.d.ts +7 -0
- package/dist-lib/{registry-r4hiflwC.js → registry-C2VD-5MD.js} +1103 -879
- package/dist-lib/testing.js +10 -10
- package/dist-lib/types/api.d.ts +3 -10
- package/dist-lib/types/schema.d.ts +51 -13
- package/dist-lib/{useCurrentScreen-CpQjVmrT.js → useCurrentScreen-ow4r-nWa.js} +1130 -1054
- package/dist-lib/{useProperties-CULxrNT4.js → useProperties-lEKfzm2X.js} +114 -83
- package/dist-lib/{value-fUHxMV4r.js → value-CXohNH6a.js} +1 -1
- package/dist-lib/vite/index.js +23 -22
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as e } from "./DynamicIcon-
|
|
2
|
-
import { A as t,
|
|
1
|
+
import { s as e } from "./DynamicIcon-Dc2j-rg_.js";
|
|
2
|
+
import { A as t, Ln as n, Sn as r, j as i, lr as a, ur as o } from "./useCurrentScreen-ow4r-nWa.js";
|
|
3
3
|
import { n as s, r as c, t as l } from "./dataTableStyles-vwD1mVOP.js";
|
|
4
4
|
import { useCallback as u, useMemo as d, useRef as f } from "react";
|
|
5
5
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
@@ -7,7 +7,7 @@ import { DndContext as h, PointerSensor as g, closestCenter as _, useSensor as v
|
|
|
7
7
|
import { SortableContext as b, useSortable as x, verticalListSortingStrategy as S } from "@dnd-kit/sortable";
|
|
8
8
|
import { CSS as C } from "@dnd-kit/utilities";
|
|
9
9
|
//#region src/components/detail-layout/DraggableChildrenTable.tsx
|
|
10
|
-
function w({ config: t, childEntity: n, schema:
|
|
10
|
+
function w({ config: t, childEntity: n, schema: i, rows: a, onChange: l, validationErrors: x, refs: C }) {
|
|
11
11
|
let w = f(null), E = t.position_field, D = t.columns, O = y(v(g, { activationConstraint: { distance: 5 } })), k = new Set(Array.isArray(t.foreign_key) ? t.foreign_key : [t.foreign_key]), A = D.filter((e) => {
|
|
12
12
|
if (k.has(e) || e === E) return !1;
|
|
13
13
|
let t = n.fields.get(e);
|
|
@@ -16,56 +16,56 @@ function w({ config: t, childEntity: n, schema: r, rows: i, onChange: l, validat
|
|
|
16
16
|
if (e === E) return !0;
|
|
17
17
|
let t = n.fields.get(e);
|
|
18
18
|
return t && (t.auto || t.primary || t.source);
|
|
19
|
-
})), M = D.filter((e) => e !== E), N = d(() =>
|
|
20
|
-
l(
|
|
19
|
+
})), M = D.filter((e) => e !== E), N = d(() => a.filter((e) => !e._deleted).map((e) => e._key), [a]), P = u((e, t, n) => {
|
|
20
|
+
l(a.map((r) => r._key === e ? {
|
|
21
21
|
...r,
|
|
22
22
|
[t]: n,
|
|
23
23
|
_dirty: !0
|
|
24
24
|
} : r));
|
|
25
|
-
}, [
|
|
26
|
-
let e =
|
|
25
|
+
}, [a, l]), F = u(() => {
|
|
26
|
+
let e = a.filter((e) => !e._deleted).reduce((e, t) => {
|
|
27
27
|
let n = typeof t[E] == "number" ? t[E] : -1;
|
|
28
28
|
return Math.max(e, n);
|
|
29
29
|
}, -1), r = {
|
|
30
30
|
_key: crypto.randomUUID(),
|
|
31
31
|
_dirty: !0,
|
|
32
32
|
[E]: e + 1
|
|
33
|
-
},
|
|
33
|
+
}, i = t.quick_add?.defaults ?? {};
|
|
34
34
|
for (let e of A) {
|
|
35
35
|
let t = n.fields.get(e);
|
|
36
|
-
t && (
|
|
36
|
+
t && (i[e] === void 0 ? t.default === void 0 ? t.type === "bool" && (r[e] = !1) : r[e] = t.default : r[e] = i[e]);
|
|
37
37
|
}
|
|
38
|
-
l([...
|
|
38
|
+
l([...a, r]);
|
|
39
39
|
}, [
|
|
40
|
-
|
|
40
|
+
a,
|
|
41
41
|
l,
|
|
42
42
|
A,
|
|
43
43
|
n,
|
|
44
44
|
t.quick_add?.defaults,
|
|
45
45
|
E
|
|
46
46
|
]), I = u((e) => {
|
|
47
|
-
l(
|
|
47
|
+
l(a.map((t) => t._key === e ? {
|
|
48
48
|
...t,
|
|
49
49
|
_deleted: !0
|
|
50
50
|
} : t));
|
|
51
|
-
}, [
|
|
52
|
-
l(
|
|
51
|
+
}, [a, l]), L = u((e) => {
|
|
52
|
+
l(a.map((t) => t._key === e ? {
|
|
53
53
|
...t,
|
|
54
54
|
_deleted: !1
|
|
55
55
|
} : t));
|
|
56
|
-
}, [
|
|
56
|
+
}, [a, l]), R = u((e) => {
|
|
57
57
|
let { active: t, over: n } = e;
|
|
58
58
|
if (!n || t.id === n.id) return;
|
|
59
|
-
let r =
|
|
59
|
+
let r = a.filter((e) => !e._deleted), i = a.filter((e) => e._deleted), o = r.findIndex((e) => e._key === String(t.id)), s = r.findIndex((e) => e._key === String(n.id));
|
|
60
60
|
if (o === -1 || s === -1) return;
|
|
61
61
|
let c = [...r], [u] = c.splice(o, 1);
|
|
62
62
|
c.splice(s, 0, u), l([...c.map((e, t) => ({
|
|
63
63
|
...e,
|
|
64
64
|
[E]: t,
|
|
65
65
|
_dirty: e[E] !== t || e._dirty
|
|
66
|
-
})), ...
|
|
66
|
+
})), ...i]);
|
|
67
67
|
}, [
|
|
68
|
-
|
|
68
|
+
a,
|
|
69
69
|
l,
|
|
70
70
|
E
|
|
71
71
|
]), z = u((e) => {
|
|
@@ -121,7 +121,7 @@ function w({ config: t, childEntity: n, schema: r, rows: i, onChange: l, validat
|
|
|
121
121
|
let t = n.fields.get(e);
|
|
122
122
|
return /* @__PURE__ */ p("th", {
|
|
123
123
|
style: B,
|
|
124
|
-
children: t ?
|
|
124
|
+
children: t ? r(t, e, i.entities) : e
|
|
125
125
|
}, e);
|
|
126
126
|
}),
|
|
127
127
|
/* @__PURE__ */ p("th", { style: {
|
|
@@ -131,7 +131,7 @@ function w({ config: t, childEntity: n, schema: r, rows: i, onChange: l, validat
|
|
|
131
131
|
] }) }), /* @__PURE__ */ p(b, {
|
|
132
132
|
items: N,
|
|
133
133
|
strategy: S,
|
|
134
|
-
children: /* @__PURE__ */ p("tbody", { children:
|
|
134
|
+
children: /* @__PURE__ */ p("tbody", { children: a.map((e) => /* @__PURE__ */ p(T, {
|
|
135
135
|
row: e,
|
|
136
136
|
columns: M,
|
|
137
137
|
editableColumns: A,
|
|
@@ -148,7 +148,7 @@ function w({ config: t, childEntity: n, schema: r, rows: i, onChange: l, validat
|
|
|
148
148
|
})
|
|
149
149
|
}), /* @__PURE__ */ p("div", {
|
|
150
150
|
style: { marginTop: 8 },
|
|
151
|
-
children: /* @__PURE__ */ p(
|
|
151
|
+
children: /* @__PURE__ */ p(o, {
|
|
152
152
|
kind: "ghost",
|
|
153
153
|
size: "xs",
|
|
154
154
|
icon: /* @__PURE__ */ p(e.plus, { size: 12 }),
|
|
@@ -157,9 +157,9 @@ function w({ config: t, childEntity: n, schema: r, rows: i, onChange: l, validat
|
|
|
157
157
|
})
|
|
158
158
|
})] });
|
|
159
159
|
}
|
|
160
|
-
function T({ row:
|
|
161
|
-
let v = t(), y = !!
|
|
162
|
-
id:
|
|
160
|
+
function T({ row: r, columns: o, editableColumns: s, displayOnlyColumns: c, childEntity: u, validationErrors: d, refs: f, onCellChange: h, onDelete: g, onUndoDelete: _ }) {
|
|
161
|
+
let v = t(), y = !!r._deleted, b = d?.[r._key], { attributes: S, listeners: w, setNodeRef: T, transform: E, transition: D, isDragging: O } = x({
|
|
162
|
+
id: r._key,
|
|
163
163
|
disabled: y
|
|
164
164
|
}), k = {
|
|
165
165
|
transform: C.Translate.toString(E),
|
|
@@ -201,7 +201,7 @@ function T({ row: a, columns: o, editableColumns: s, displayOnlyColumns: c, chil
|
|
|
201
201
|
})
|
|
202
202
|
}),
|
|
203
203
|
o.map((e) => {
|
|
204
|
-
let t = u.fields.get(e),
|
|
204
|
+
let t = u.fields.get(e), a = b?.includes(e), o = c.has(e), l = s.includes(e);
|
|
205
205
|
return y || o || !l ? /* @__PURE__ */ p("td", {
|
|
206
206
|
style: {
|
|
207
207
|
...A,
|
|
@@ -210,30 +210,30 @@ function T({ row: a, columns: o, editableColumns: s, displayOnlyColumns: c, chil
|
|
|
210
210
|
children: t ? i({
|
|
211
211
|
field: t,
|
|
212
212
|
fieldName: e,
|
|
213
|
-
value:
|
|
213
|
+
value: r[e],
|
|
214
214
|
mode: "display",
|
|
215
|
-
record:
|
|
215
|
+
record: r,
|
|
216
216
|
refs: f,
|
|
217
217
|
locale: v
|
|
218
|
-
}) : n(
|
|
218
|
+
}) : n(r[e])
|
|
219
219
|
}, e) : /* @__PURE__ */ p("td", {
|
|
220
220
|
style: {
|
|
221
221
|
...j,
|
|
222
|
-
outline:
|
|
222
|
+
outline: a ? "1px solid var(--danger)" : "none",
|
|
223
223
|
outlineOffset: -1,
|
|
224
|
-
borderRadius:
|
|
224
|
+
borderRadius: a ? 4 : 0
|
|
225
225
|
},
|
|
226
|
-
title:
|
|
226
|
+
title: a ? `${e} is required` : void 0,
|
|
227
227
|
children: t ? i({
|
|
228
228
|
field: t,
|
|
229
229
|
fieldName: e,
|
|
230
|
-
value:
|
|
230
|
+
value: r[e],
|
|
231
231
|
mode: "edit",
|
|
232
|
-
onChange: (t) => h(
|
|
233
|
-
record:
|
|
232
|
+
onChange: (t) => h(r._key, e, t),
|
|
233
|
+
record: r,
|
|
234
234
|
refs: f,
|
|
235
235
|
locale: v
|
|
236
|
-
}) : n(
|
|
236
|
+
}) : n(r[e])
|
|
237
237
|
}, e);
|
|
238
238
|
}),
|
|
239
239
|
/* @__PURE__ */ p("td", {
|
|
@@ -242,15 +242,15 @@ function T({ row: a, columns: o, editableColumns: s, displayOnlyColumns: c, chil
|
|
|
242
242
|
borderBottom: "1px solid var(--divider)",
|
|
243
243
|
verticalAlign: "middle"
|
|
244
244
|
},
|
|
245
|
-
children: y ? /* @__PURE__ */ p(
|
|
245
|
+
children: y ? /* @__PURE__ */ p(a, {
|
|
246
246
|
size: 24,
|
|
247
247
|
icon: /* @__PURE__ */ p(e.refresh, { size: 12 }),
|
|
248
|
-
onClick: () => _(
|
|
248
|
+
onClick: () => _(r._key),
|
|
249
249
|
title: "Undo delete"
|
|
250
|
-
}) : /* @__PURE__ */ p(
|
|
250
|
+
}) : /* @__PURE__ */ p(a, {
|
|
251
251
|
size: 24,
|
|
252
252
|
icon: /* @__PURE__ */ p(e.trash, { size: 12 }),
|
|
253
|
-
onClick: () => g(
|
|
253
|
+
onClick: () => g(r._key),
|
|
254
254
|
title: "Delete row"
|
|
255
255
|
})
|
|
256
256
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect as e, useState as t, useSyncExternalStore as n } from "react";
|
|
2
|
-
import { Activity as r, ArrowDown as i, ArrowLeft as a, ArrowUp as o, ArrowUpDown as s, BadgeDollarSign as c, Ban as l, Bell as
|
|
2
|
+
import { Activity as r, ArrowDown as i, ArrowLeft as a, ArrowUp as o, ArrowUpDown as s, BadgeDollarSign as c, Ban as l, Bell as ee, Bolt as te, Box as u, Boxes as ne, Briefcase as re, Building as d, Building2 as f, Calendar as ie, CalendarClock as ae, Check as oe, ChevronDown as p, ChevronLeft as se, ChevronRight as ce, ChevronUp as le, CircleDot as ue, ClipboardCheck as de, Clock as fe, Code as pe, Columns as me, Columns3 as he, Command as ge, Copy as _e, Cpu as m, CreditCard as h, Database as g, Dot as _, Download as v, Edit as y, ExternalLink as b, Eye as x, EyeOff as S, File as C, FileDiff as w, FilePlus as T, Filter as E, Folder as D, FormInput as O, GitBranch as k, Globe as A, Grid as j, Group as M, Hash as N, Home as P, Inbox as F, Info as I, Key as ve, KeyRound as L, Layers as ye, Layout as be, LayoutDashboard as xe, Link as Se, List as Ce, ListChecks as we, Loader as Te, Lock as Ee, LogIn as De, LogOut as Oe, Mail as ke, Menu as Ae, Minus as je, Moon as Me, MoreHorizontal as Ne, Package as Pe, Paperclip as Fe, Play as Ie, PlayCircle as Le, Plus as R, PlusCircle as Re, ReceiptText as ze, RefreshCw as Be, Repeat as Ve, Save as He, ScrollText as Ue, Search as We, Settings as Ge, Settings2 as Ke, Shield as qe, ShieldCheck as Je, ShieldPlus as Ye, ShoppingCart as Xe, Sliders as Ze, SlidersHorizontal as Qe, Smartphone as $e, Sparkle as et, Sparkles as tt, Star as nt, Sun as rt, Table2 as it, Tag as at, Tags as ot, ToggleRight as st, Trash as ct, Trash2 as lt, TriangleAlert as ut, Undo2 as dt, Upload as ft, User as pt, UserPlus as mt, Users as z, UsersRound as ht, WalletCards as gt, Webhook as _t, Workflow as vt, X as yt, Zap as B } from "lucide-react";
|
|
3
3
|
import { jsx as V } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/primitives/Icons.tsx
|
|
5
5
|
var H = (e) => function({ size: t = 14, cls: n = "", style: r = {} }) {
|
|
@@ -29,12 +29,12 @@ var H = (e) => function({ size: t = 14, cls: n = "", style: r = {} }) {
|
|
|
29
29
|
back: H(a),
|
|
30
30
|
"badge-dollar-sign": H(c),
|
|
31
31
|
ban: H(l),
|
|
32
|
-
bell: H(
|
|
33
|
-
bolt: H(
|
|
34
|
-
box: H(
|
|
35
|
-
boxes: H(
|
|
32
|
+
bell: H(ee),
|
|
33
|
+
bolt: H(te),
|
|
34
|
+
box: H(u),
|
|
35
|
+
boxes: H(ne),
|
|
36
36
|
branch: H(k),
|
|
37
|
-
building: H(
|
|
37
|
+
building: H(d),
|
|
38
38
|
calendar: H(ie),
|
|
39
39
|
check: H(oe),
|
|
40
40
|
cheveron: H(p),
|
|
@@ -44,7 +44,7 @@ var H = (e) => function({ size: t = 14, cls: n = "", style: r = {} }) {
|
|
|
44
44
|
columns: H(me),
|
|
45
45
|
"columns-3": H(he),
|
|
46
46
|
command: H(ge),
|
|
47
|
-
company: H(
|
|
47
|
+
company: H(f),
|
|
48
48
|
copy: H(_e),
|
|
49
49
|
cpu: H(m),
|
|
50
50
|
"credit-card": H(h),
|
|
@@ -56,7 +56,7 @@ var H = (e) => function({ size: t = 14, cls: n = "", style: r = {} }) {
|
|
|
56
56
|
download: H(v),
|
|
57
57
|
edit: H(y),
|
|
58
58
|
email: H(ke),
|
|
59
|
-
entity: H(
|
|
59
|
+
entity: H(u),
|
|
60
60
|
external: H(b),
|
|
61
61
|
eye: H(x),
|
|
62
62
|
eyeOff: H(S),
|
|
@@ -77,7 +77,7 @@ var H = (e) => function({ size: t = 14, cls: n = "", style: r = {} }) {
|
|
|
77
77
|
idp: H(L),
|
|
78
78
|
inbox: H(F),
|
|
79
79
|
info: H(I),
|
|
80
|
-
jobs: H(
|
|
80
|
+
jobs: H(re),
|
|
81
81
|
key: H(ve),
|
|
82
82
|
"key-round": H(L),
|
|
83
83
|
layers: H(ye),
|
|
@@ -103,10 +103,10 @@ var H = (e) => function({ size: t = 14, cls: n = "", style: r = {} }) {
|
|
|
103
103
|
pipeline: H(k),
|
|
104
104
|
play: H(Ie),
|
|
105
105
|
"play-circle": H(Le),
|
|
106
|
-
plus: H(
|
|
107
|
-
"plus-circle": H(
|
|
108
|
-
"receipt-text": H(
|
|
109
|
-
refresh: H(
|
|
106
|
+
plus: H(R),
|
|
107
|
+
"plus-circle": H(Re),
|
|
108
|
+
"receipt-text": H(ze),
|
|
109
|
+
refresh: H(Be),
|
|
110
110
|
repeat: H(Ve),
|
|
111
111
|
right: H(ce),
|
|
112
112
|
save: H(He),
|
|
@@ -126,7 +126,7 @@ var H = (e) => function({ size: t = 14, cls: n = "", style: r = {} }) {
|
|
|
126
126
|
sun: H(rt),
|
|
127
127
|
tag: H(at),
|
|
128
128
|
tags: H(ot),
|
|
129
|
-
tenant: H(
|
|
129
|
+
tenant: H(d),
|
|
130
130
|
"toggle-right": H(st),
|
|
131
131
|
trash: H(ct),
|
|
132
132
|
"trash-2": H(lt),
|
|
@@ -217,12 +217,14 @@ function wt({ name: e, size: t, className: r, style: i }) {
|
|
|
217
217
|
style: i
|
|
218
218
|
});
|
|
219
219
|
let s = W[e];
|
|
220
|
-
|
|
220
|
+
if (s) return /* @__PURE__ */ V(s, {
|
|
221
221
|
size: a,
|
|
222
222
|
cls: r,
|
|
223
223
|
style: i
|
|
224
|
-
})
|
|
225
|
-
|
|
224
|
+
});
|
|
225
|
+
let c = e.startsWith(Ct) ? e.slice(7) : e;
|
|
226
|
+
return /* @__PURE__ */ V($, {
|
|
227
|
+
name: c,
|
|
226
228
|
size: a,
|
|
227
229
|
className: r,
|
|
228
230
|
style: i
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as e, I as t, L as n, P as r, R as i, z as a } from "./useCurrentScreen-
|
|
2
|
-
import { c as o, i as s, l as c, t as l } from "./value-
|
|
1
|
+
import { B as e, I as t, L as n, P as r, R as i, z as a } from "./useCurrentScreen-ow4r-nWa.js";
|
|
2
|
+
import { c as o, i as s, l as c, t as l } from "./value-CXohNH6a.js";
|
|
3
3
|
import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
4
4
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
5
5
|
import { DndContext as v, PointerSensor as y, closestCenter as b, useSensor as x, useSensors as ee } from "@dnd-kit/core";
|